package com.zhaohanlin.start;

import org.junit.Test;

/**
 * @author zhaohanlin
 */

public class OverrideTest {
static class Fu{
public A methodA(){return new A();}
}
static class Zi extends Fu{
@Override
    public B methodA(){return new B();}
}
static class A{

}
static class B extends A{

}
@Test
    public void methodA(){
    System.out.println(new Zi().methodA());
}
}
